#ifndef AFX_CTOOLBAR_H
#define AFX_CTOOLBAR_H

#include <windows.h>
#include <commctrl.h>
#include <uxtheme.h>

class CToolbar {
  private:
    struct TB_DATA
    {
      UINT uWidth;
      UINT uHeight;
      UINT uItemCount;
      UINT uIDs[1];
    };
    HWND m_hToolbar;
  public:
    CToolbar();
    void SetHandle(HWND hToolbar);
    HWND GetHandle();
    HWND Create(DWORD dwStyle, HWND hParentWnd, UINT nID);
    BOOL Destroy();
    INT AddBitmap(int nButtons, LPTBADDBITMAP lpBitmap);
    INT AddButtons(UINT nNumButtons, LPTBBUTTON lpButtons);
    INT AddString(HINSTANCE hInstance, LPCTSTR lpStringName);
    INT AutoSize();
    INT ButtonCount();
    INT ButtonStructureSize(int cbSize);
    INT ChangeBitmap(int nButton, int nBitmapIndex);
    INT CheckButton(int nButton, BOOL bCheck);
    INT CommandToIndex(int nButton);
    INT Customize();
    INT DeleteButton(int nButton);
    INT EnableButton(int nButton, BOOL bEnable);
    INT GetAnchorHighlight();
    INT GetBitmap(int nButton);
    INT GetBitmapFlags();
    INT GetButton(int nButton, LPTBBUTTON lpButton);
    INT SetButtonInfo(int nID, LPTBBUTTONINFO lpButtonInfo);
    INT GetButtonInfo(int nID, LPTBBUTTONINFO lpButtonInfo);
    INT SetButtonSize(int nButtonX, int nButtonY);
    INT GetButtonSize();
    INT GetButtonText(int nButton, LPSTR lpszText);
    INT SetColorScheme(LPCOLORSCHEME lpColorScheme);
    INT GetColorScheme(LPCOLORSCHEME lpColorScheme);
    INT SetDisabledImageList(HIMAGELIST hImageList);
    INT GetDisabledImageList();
    INT SetExtendedStyle(DWORD dwExStyle);
    INT GetExtendedStyle();
    INT SetHotImageList(HIMAGELIST hImageList);
    INT GetHotImageList();
    INT SetHotItem(int nHot);
    INT GetHotItem();
    INT SetImageList(int nImageID, HIMAGELIST hImageList);
    INT GetImageList();
    INT SetInsertMark(LPTBINSERTMARK lpMark);
    INT GetInsertMark(LPTBINSERTMARK lptbInsertMark);
    INT SetInsertMarkColor(COLORREF clrInsertMark);
    INT GetInsertMarkColor();
    INT GetItemRect(int nButton, LPRECT lpRect);
    INT GetMaxSize(LPSIZE lpSize);
    INT SetMetrics(LPTBMETRICS ptbMetrics);
    INT GetMetrics(LPTBMETRICS ptbMetrics);
    INT SetPadding(int nPaddingX, int nPaddingY);
    INT GetPadding();
    INT GetPressedImageList();
    INT GetRect(int nID, LPRECT lpRect);
    INT SetRows(int nRows, BOOL bLarger, LPRECT lpRect);
    INT GetRows();
    INT SetState(int nButton, UINT nState);
    INT GetState(int nButton);
    INT GetString(int nString, LPTSTR lpBuffer, int nLength);
    INT SetStyle(DWORD dwStyle);
    INT GetStyle();
    INT GetTextRows();
    INT SetToolTips(HWND hwndToolTip);
    INT GetTooltips();
    INT SetUnicodeFormat(BOOL bUnicode);
    INT GetUnicodeFormat();
    INT HideButton(int nButton, BOOL bShow);
    INT HitTest(LPPOINT lpPoint);
    INT Indeterminate(int nButton, BOOL bIndeterminate);
    INT InsertButton(int nButton, LPTBBUTTON lpButton);
    INT InsertMarkHitTest(LPPOINT lpPoint, LPTBINSERTMARK lpMark);
    INT IsButtonChecked(int nButton);
    INT IsButtonEnabled(int nButton);
    INT IsButtonHidden(int nButton);
    INT IsButtonHighlighted(int nButton);
    INT IsButtonIndeterminate(int nButton);
    INT IsButtonPressed(int nButton);
    INT LoadImages(HINSTANCE hInstance, int nBitmapID);
    INT MapAccelerator(TCHAR chAccel, LPUINT pIDButton);
    INT MarkButton(int nButton, BOOL bHighlight);
    INT MoveButton(UINT nOldPos, UINT nNewPos);
    INT PressButton(int nButton, BOOL bPress);
    INT ReplaceBitmap(LPTBREPLACEBITMAP ptReplaceBitmap);
    INT SaveRestore(BOOL bSave, TBSAVEPARAMS * pSaveParams);
    INT SetAnchorHighlight(BOOL bAnchor);
    INT SetBitmapSize(int nBitmapX, int nBitmapY);
    INT SetButtonWidth(int nMinimumX, int nMinimumY);
    INT SetCmdID(UINT nIndex, UINT nCmdID);
    INT SetDrawTextFlags(DWORD dwMask, DWORD dwDTFlags);
    INT SetIndent(int nIndent);
    INT SetListGap(int nPixels);
    INT SetMaxTextRows(int nMaxRows);
    INT SetParent(HWND hwndParent);
    INT SetPressedImageList(int nImageID, HIMAGELIST hImageList);
    INT SetWindowTheme(LPWSTR pwVisualStyle);
};

#endif // AFX_CTOOLBAR_H
